1. Technical Field
The present invention relates to an image processor and an image processing method for performing skin color correction to captured RGB signals without adversely affecting white balance and for outputting an obtained image to a display device, and to a recording medium for storing a program for executing the image processing.
2. Description of Related Art
In recent years, plentiful image processors for detecting skin color regions (skin color pixel regions) in an image on the basis of captured image signal values and correcting the skin color in the skin color pixel regions on the basis of user instructions have been proposed. The method for correcting the skin color has been disclosed in Japanese Patent Application Laid-Open No. 2006-237798, for example.
A type of skin color correction processor, provided for an image processor, captures RGB signals of the three primary color signals of an image subjected to white balance (hereafter referred to as WB) correction and performs skin color correction processing on the basis of the RGB signals. The WB correction is defined as processing for adjusting WB by changing the mixture ratio of RGB signal values to be output to 1.1:0.9:1.0, for example, instead of 1:1:1. The method for the WB correction is disclosed in Japanese Patent Application Laid-Open No. 2007-142983, for example.
FIG. 1 is a block diagram showing the configuration of a conventional skin color correction processor 30.
The skin color correction processor 30 comprises a correction signal capturing section 31, a YCbCr conversion section 32, a skin color pixel regions detection section 33, a skin color correction section 34, a RGB conversion section 35 and an output section 36.
R1G1B1 signal values of three primary color signals that are WB-corrected using a lookup table (hereafter referred to as LUT) are input from a tuner (not shown) to the correction signal capturing section 31 of the skin color correction processor 30. The correction signal capturing section 31 outputs the R1G1B1 signal values to the YCbCr conversion section 32 and the output section 36.
The YCbCr conversion section 32 converts the R1G1B1 signal values into Y1Cb1Cr1 signal values of component signals using a matrix (hereafter referred to as RGB-YCbCr matrix) for converting RGB signal values into YCbCr signal values on the basis of the ITU-RBT.709 standard as shown in Expression (1) described below. The YCbCr conversion section 32 outputs the obtained Y1Cb1Cr1 signal values to the skin color pixel region detection section 33 and the skin color correction section 34.
                              [                      Expression            ⁢                                                  ⁢            1                    ]                ⁢                                                                                                (                                                                      Y                  1                                                                                                      Cb                  1                                                                                                      Cr                  1                                                              )                =                              (                                                            0.2126                                                  0.7152                                                  0.072                                                                                                  -                    0.1146                                                                                        -                    0.3854                                                                    0.5                                                                              0.5                                                                      -                    0.4542                                                                                        -                    0.0458                                                                        )                    ⁢                      (                                                                                R                    1                                                                                                                    G                    1                                                                                                                    B                    1                                                                        )                                              (        1        )            
The skin color pixel region detection section 33 detects a skin color pixel regions on the basis of the Y1Cb1Cr1 signal values.
The skin color correction section 34 performs color conversion for the Y1Cb1Cr1 signal values according to Expression (2) described below on the basis of the coefficients of saturation s, hue θ and brightness L set by the user and obtains Y2Cb2Cr2 signal values of the component signals. Then, the skin color correction section 34 outputs the obtained Y2Cb2Cr2 signal values to the RGB conversion section 35.
                              [                      Expression            ⁢                                                  ⁢            2                    ]                ⁢                                                                                                (                                                                      Y                  2                                                                                                      Cb                  2                                                                                                      Cr                  2                                                              )                =                              (                                                            L                                                  0                                                  0                                                                              0                                                                      s                    ⁢                                                                                  ⁢                    cos                    ⁢                                                                                  ⁢                    θ                                                                                                              -                      s                                        ⁢                                                                                  ⁢                    sin                    ⁢                                                                                  ⁢                    θ                                                                                                0                                                                      s                    ⁢                                                                                  ⁢                    sin                    ⁢                                                                                  ⁢                    θ                                                                                        s                    ⁢                                                                                  ⁢                    cos                    ⁢                                                                                  ⁢                    θ                                                                        )                    ⁢                      (                                                                                Y                    1                                                                                                                    Cb                    1                                                                                                                    Cr                    1                                                                        )                                              (        2        )            
Then, the RGB conversion section 35 converts the Y2Cb2Cr2 signal values into R2G2B2 signal values of the three primary color signals using a matrix (hereafter referred to as YCbCr-RGB matrix) for converting YCbCr signal values into RGB signal values on the basis of the ITU-RBT.709 standard as shown in Expression (3) described below and outputs the obtained signal values to the output section 36.
                              [                      Expression            ⁢                                                  ⁢            3                    ]                ⁢                                                                                                (                                                                      R                  2                                                                                                      G                  2                                                                                                      B                  2                                                              )                =                              (                                                            1                                                  0                                                  1.5748                                                                              1                                                                      -                    0.1873                                                                                        -                    0.4681                                                                                                1                                                  1.8556                                                  0                                                      )                    ⁢                      (                                                                                Y                    2                                                                                                                    Cb                    2                                                                                                                    Cr                    2                                                                        )                                              (        3        )            
The conversions from the R1G1B1 signal values to the R2G2B2 signal values according to Expressions (1) to (3) described above are combined into one conversion represented by Expression (4) described below.
                              [                      Expression            ⁢                                                  ⁢            4                    ]                ⁢                                                                                                (                                                                      R                  2                                                                                                      G                  2                                                                                                      B                  2                                                              )                =                              (                                                            1                                                  0                                                  1.5748                                                                              1                                                                      -                    0.1873                                                                                        -                    0.4681                                                                                                1                                                  1.8556                                                  0                                                      )                    ⁢                      (                                                            L                                                  0                                                  0                                                                              0                                                                      s                    ⁢                                                                                  ⁢                    cos                    ⁢                                                                                  ⁢                    θ                                                                                                              -                      s                                        ⁢                                                                                  ⁢                    sin                    ⁢                                                                                  ⁢                    θ                                                                                                0                                                                      s                    ⁢                                                                                  ⁢                    sin                    ⁢                                                                                  ⁢                    θ                                                                                        s                    ⁢                                                                                  ⁢                    cos                    ⁢                                                                                  ⁢                    θ                                                                        )                    ⁢                      (                                                            0.2126                                                  0.7152                                                  0.072                                                                                                  -                    0.1146                                                                                        -                    0.3854                                                                    0.5                                                                              0.5                                                                      -                    0.4542                                                                                        -                    0.0458                                                                        )                    ⁢                      (                                                                                R                    1                                                                                                                    G                    1                                                                                                                    B                    1                                                                        )                                              (        4        )            
The output section 36 reconstructs the image signals by applying the R2G2B2 signal values to the skin color pixel regions and by applying the R1G1B1 signal values to pixel regions other than the skin color pixel regions and outputs the image signals thus reconstructed to a display device (not shown), such as an LCD (liquid crystal display) display.